/* File pswf.c 3:49 PM 10/10/97 */

#define NO_PSWFS 5
#include "grid.h"
pswf_struct pswf_db[NO_PSWFS]={

{4.0, 16, 0.99588549,
	{0.5239891E+01,	-0.5308499E+01,	 0.1184591E+01, 
	-0.1230763E-00,	 0.7371623E-02,	-0.2864074E-03,
	 0.7789983E-05,	-0.1564700E-06,	 0.2414647E-08}},

{4.2, 16, 0.99657887,
	{0.6062942E+01,	-0.6450252E+01,	 0.1551875E+01,
	-0.1755960E-01,	 0.1150712E-01,	-0.4903653E-03,
	 0.1464986E-04,	-0.3235110E-06,	 0.5492141E-08}},

{5.0, 18, 0.99935241,
	{0.1115509E+02,	-0.1384861E+02,	 0.4289811E+01,
	-0.6514303E-00,	 0.5844993E-01,	-0.3447736E-02,
	 0.1435066E-03,	-0.4433680E-05,	 0.1056040E-06,
	-0.1997173E-08}},

{6.0, 18, 0.9990188,
	{0.2495593E+02,	-0.3531124E+02,	 0.1383722E+02,
	-0.2799028E+01,	 0.3437217E-00,	-0.2818024E-01,
	 0.1645842E-02,	-0.7179160E-04,	 0.2424510E-05,
	-0.6520875E-07}},

{7.0, 20, 0.99998546,
	{0.5767616E+02,	-0.8931343E+02,	 0.4167596E+02,
	-0.1053599E+02,	 0.1662374E+01,	-0.1780527E-00,
	 0.1372983E-01,	-0.7963169E-03,	 0.3593372E-04,
	-0.1295941E-05,	 0.3817796E-07}}
};

void get_pswf(float C, pswf_struct **P){
	int i=0;
	while(i<NO_PSWFS && abs(C-pswf_db[i].C)>0.01) i++;
	if(i>=NO_PSWFS) 
	{
		fprintf(stderr,
		 "Prolate parameter, C = %f not in data base\n",C);
		exit(2);
	}
	*P=&pswf_db[i];
	return;
}

